<?php

namespace Home\Controller;

use Home\Core\CommandSDK;

class OperationLogController extends BaseController
{
    /**
     * 检索人员列表
     */
    public function operation_log()
    {
        $param = I('get.');
        $param['begintime']=strtotime($param['begintime']);
        $param['endtime']=strtotime($param['endtime']);
        if(empty($param['pageid'])){
            $param['pageid']=1;
        }else{
            $param['pageid']=$param['pageid'];
        }
        if(empty($param['pagecount'])){
            $param['pagecount']=10;
        }else{
            $param['pagecount']=$param['pagecount'];
        }
        $sdk = new CommandSDK();
        $return = $this->http_request($sdk::getLogList, $param, 'GET');
        $array = json_decode(json_encode($return), true);
        $pageid=$param['pageid'];
        $pagecount=$param['pagecount'];
        $totnum=$return->totnum;
        $pagenum=$totnum/$pagecount;
        $this->assign('pageid', $pageid);//页数
        $this->assign('pagecount', $pagecount);//每页显示条数
        $this->assign('pagenum', $pagenum);//总页数
        $this->assign('totnum', $totnum); //总条数
        $this->assign('param',$param);   // 搜索条件
        $this->assign('array', $array);
        $this->display();
    }
  


}